odhcpd: apply RFC9096 recommended lifetimes
authorAviana Cruz <[email protected]>
Sat, 16 Sep 2023 15:04:12 +0000 (15:04 +0000)
committerÁlvaro Fernández Rojas <[email protected]>
Thu, 18 Sep 2025 17:29:54 +0000 (19:29 +0200)
commit86c0200f80670c36d200f827f3558e4f676d9171
tree730a4a36c985ec979b7e80393100d352bf5c6042
parentc9816de148cc3e8096e67519d2c081ffeb9b4857
odhcpd: apply RFC9096 recommended lifetimes

To address issues with hosts retaining stale IPv6 configuration, this change
implements the Recommended Option Lifetimes Configuration Values from
RFC 9096-Section 4.

The `ra_lifetime` is set to 2700s (45min) by default, and the DHCPv6-PD is now
capped at 2700s for preferred lifetime and 5400s (90min) for valid lifetime.

The following changes are introduced:

- The `ra_useleasetime` option is removed.
- New options `max_preferred_lifetime` and `max_valid_lifetime` are added to
  configure the upper limits for prefix lifetimes.
- The Router Advertisement, DNS, and DNR option lifetimes are now dynamically
  adjusted based on the advertised prefix lifetimes to ensure consistency.

These changes help to mitigate issues with stale configurations on client
devices, particularly after network renumbering events.

Signed-off-by: Aviana Cruz <[email protected]>
README
src/config.c
src/dhcpv6-ia.c
src/odhcpd.h
src/router.c